package com.sinacom.ibuilding.beans;

import java.util.Date;
import java.util.List;

import org.apache.commons.lang.StringUtils;

public class Message implements java.io.Serializable{

    /**
	 * 
	 */
	private static final long serialVersionUID = 6932529964719252049L;

	private String id ;
   
    private Date createDate;
    private Date modifyDate;
  
    private String member;
    private Integer boxType;//信箱类型 1.发件箱 2.收件箱
    private String title;
    private String content;
    private String smember;
    private String susername;
    
    private String rmember;
    private Integer type;
    private Boolean isRead;
    private Boolean sendStatus;
    
    private Boolean isSendMsg;
    private List attachList;
    
    private String attachs;
    public String getId() {
        return id;
    }
    public void setId(String id) {
        this.id = id;
    }
    public Date getCreateDate() {
        return createDate;
    }
    public void setCreateDate(Date createDate) {
        this.createDate = createDate;
    }
    public Date getModifyDate() {
        return modifyDate;
    }
    public void setModifyDate(Date modifyDate) {
        this.modifyDate = modifyDate;
    }
    public String getMember() {
        return member;
    }
    public void setMember(String member) {
        this.member = member;
    }
    public Integer getBoxType() {
        return boxType;
    }
    public void setBoxType(Integer boxType) {
        this.boxType = boxType;
    }
    public String getTitle() {
        return title;
    }
    public void setTitle(String title) {
        this.title = title;
    }
    public String getContent() {
        return content;
    }
    public void setContent(String content) {
        this.content = content;
    }
    public String getSmember() {
        return smember;
    }
    public void setSmember(String smember) {
        this.smember = smember;
    }
    public String getRmember() {
        return rmember;
    }
    public void setRmember(String rmember) {
        this.rmember = rmember;
    }
    public Integer getType() {
        return type;
    }
    public void setType(Integer type) {
        this.type = type;
    }
    public Boolean getIsRead() {
        return isRead;
    }
    public void setIsRead(Boolean isRead) {
        this.isRead = isRead;
    }
    public Boolean getSendStatus() {
        return sendStatus;
    }
    public void setSendStatus(Boolean sendStatus) {
        this.sendStatus = sendStatus;
    }
	public String getAttachs() {
		return attachs;
	}
	public void setAttachs(String attachs) {
		this.attachs = attachs;
	}
	public List getAttachList() {
		return attachList;
	}
	public void setAttachList(List attachList) {
		this.attachList = attachList;
	}
	public Boolean getIsSendMsg() {
		return isSendMsg;
	}
	public void setIsSendMsg(Boolean isSendMsg) {
		this.isSendMsg = isSendMsg;
	}
	public String getSusername() {
		return susername;
	}
	public void setSusername(String susername) {
		this.susername = susername;
	}
	public String getRusername() {
		if(!StringUtils.isEmpty(rmember)){
			StringBuffer sb = new StringBuffer();
			String[] rms = rmember.split(";");
			for (int i = 0; i < rms.length; i++) {
				if(!StringUtils.isEmpty(rms[i])){
					String[] members = rms[i].split("#");
					if(members!=null){
						sb.append(members[2]);
						if(i+1 != rms.length){
							sb.append(";");
						}
						
					}
				}
			}
			return sb.toString();
		}
		return null;
	}
	
    
    

}
